//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package org.ares.app.demo.common.mvc.filter;

import java.io.IOException;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

import org.apache.catalina.*;
import org.springframework.util.StreamUtils;

public class DemoRequestWrapper extends HttpServletRequestWrapper {
    private final byte[] body;

    public DemoRequestWrapper(HttpServletRequest request) throws IOException {
        super(request);
        this.body = StreamUtils.copyToByteArray(request.getInputStream());
    }

    public ServletInputStream getInputStream() throws IOException {
        return new BufferedServletInputStream(this.body);
    }
}
